  protected function cartMerge()
  {
    $this->configuration->setCartItems(array_merge($this->configuration->getCartProcessedItems(), $this->configuration->getCartItems()));
    $this->cleanCartProcessedItems();
  }

  protected function cleanCartItems()
  {
    $this->configuration->setCartItems(array());
  }

  protected function cleanCartProcessedItems()
  {
    $this->configuration->setCartProcessedItems(array());
  }

  protected function cleanCart()
  {
    $this->cleanCartItems();
    $this->cleanCartProcessedItems();
  }

  public function executeCartReset(sfWebRequest $request)
  {
    $this->cleanCart();
    $this->getUser()->setFlash('notice', 'The cart is now empty');
    $this->redirect("@<?php echo $this->getUrlForAction('list') ?>");
  }
